package org.example.ch2;

import io.reactivex.rxjava3.core.Observable;

import java.util.concurrent.Executors;
import java.util.concurrent.Future;

public class Main8 {
    public static void main(String[] args) {

        Future<String> future = Executors.newCachedThreadPool().submit(() -> "hello lagou");

        // 从callable创建响应式流，订阅，消费
        Observable.fromFuture(future).subscribe(System.out::println);


    }
}
